// enum 枚举 属性不赋值则属性值从前一项依次为索引
enum Color {
    Red,    // 0
    Green,  // 1
    Blue,   // 2
}
let c: Color = Color.Green;
console.log(c)  // 1

enum Color1 {
    Red = 1,  // 1
    Green,    // 2
    Blue,     // 3
}
let c1: Color1 = Color1.Green
console.log(c1)  // 2

enum Color2 {
    Red = 1,    // 1
    Green = 4,  // 4
    Blue = 8,   // 8
}
let c2: Color2 = Color2.Green
console.log(c2)  // 4

